// 引入基本模板
let echarts = require('echarts')

export default {
  name: 'hello',
  data() {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  mounted() {
    this.drawLine();
  },
  methods: {
    drawLine() {
      let salesStatistics = echarts.init(document.getElementById('salesStatistics'));
      let orderStatistics = echarts.init(document.getElementById('orderStatistics'));
      orderStatistics.setOption({
        tooltip: {},
        xAxis: {
          type: 'categoryComp',
          data:
            ["aa", "bbb", "ccc", "ddd", "eee", "fff"]
        },
        yAxis: {},
        series: [
          {
            name: '销量',
            type: 'line',
            data: [5, 20, 36, 10, 10, 20],
            areaStyle: {}
          }
        ]
      });
      salesStatistics.setOption({
        tooltip: {},
        xAxis: {
          type: 'categoryComp',
          data:
            ["aa", "bbb", "ccc", "ddd", "eee", "fff"]
        },
        yAxis: {},
        series: [
          {
            name: '销量',
            type: 'line',
            data: [5, 20, 36, 10, 10, 20],
            areaStyle: {}
          }
        ]
      });
    }
  }
}
